home
***
CD-ROM
|
disk
|
FTP
|
other
***
search
/
FM Towns: Free Software Collection 7
/
FM Towns Free Software Collection 7.iso
/
t_os
/
gpen32k
/
source.exe
/
LIB
/
OSRC
/
SPTRIG.C
< prev
next >
Wrap
Text File
|
1993-08-05
|
517b
|
18 lines
/***************************************************************
Okome Super Famic PAD V1.04 High-C V1.7
Copyright(C) おこめ 1991,1992
***************************************************************/
int sptrig(int n) /* SFC PAD +LAYXBR ボタンの読み取り */
{
int i;
if (n == (n & 1)) {
_outb(0x4d6, 15);
i = ~_inb(0x4d0 + n * 2) >> 4 & 3;
_outb(0x4d6, 0x3f);
return (i + ((~_inb(0x4d0 + n * 2) & 63) << 2));
} else {
return (0);
}
}